package com.example.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.util.Date;

@Data
@TableName(value = "sys_cdc_listener")
public class SysCdcListener extends Model<SysCdcListener> {

    @TableId(type = IdType.ASSIGN_ID)
    private Long id;

    @TableField(value = "host")
    private String host;

    @TableField(value = "port")
    private int port;

    @TableField(value = "user_name")
    private String userName;

    @TableField(value = "pass_word")
    private String passWord;

    @TableField(value = "driver_class_name")
    private String driverClassName;

    @TableField(value = "schema_name")
    private String schemaName;

    @TableField(value = "table_name")
    private String tableName;

    @TableField(value = "type")
    private String type;

    @TableField(value = "is_topic")
    private boolean isTopic;

    @TableField(value = "destination")
    private String destination;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "create_time")
    private Date createTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "create_time")
    private Date updateTime;

    public void recalculateFields() {
    }
}
